package com.cmc.cloud.cmclink.doc.vo.confirmnoticevo;

import static com.cmes.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

import java.time.LocalDateTime;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonFormat;import org.hibernate.validator.constraints.Length;
import com.cmc.cloud.cmclink.doc.configuration.CustomLocalDateTimeSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 确认装货港更改通知 Base VO，提供给添加、修改、详细的子 VO 使用 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 * 
 * @author codegen
 */
@Data
public class ConfirmNoticeBaseVO {

    @Schema(description = "通知类型有：Telex/SeaWay、FCN、Cancel Telex/SeaWay、MCN、COD",
        requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{confirmnotice.notice.notblank}")
    @Length(max = 64, message = "{confirmnotice.notice.length}")
    private String notice;

    @Schema(description = "操作类型",
            requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{confirmnotice.operateType.notblank}")
    @Length(max = 64, message = "{confirmnotice.operateType.length}")
    private String operateType;

    @Schema(description = "提单号id", requiredMode = Schema.RequiredMode.REQUIRED, example = "19881")
    @NotNull(message = "{confirmnotice.blnoid.notnull}")
    private Long blnoId;

    @Schema(description = "接货地", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{confirmnotice.porcode.notblank}")
    @Length(max = 5, message = "{confirmnotice.porcode.length}")
    private String porCode;

    @Schema(description = "目的地", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{confirmnotice.delcode.notblank}")
    @Length(max = 5, message = "{confirmnotice.delcode.length}")
    private String delCode;

    @Schema(description = "申请人")
    @Length(max = 64, message = "{confirmnotice.checker.length}")
    private String applyUser;

    @Schema(description = "申请时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime applyTime;

    @Schema(description = "状态有三种：Noted、Approve、Reject", example = "1")
    @Length(max = 64, message = "{confirmnotice.status.length}")
    private String status;

    @Schema(description = "通知内容", example = "你说的对")
    @Length(max = 200, message = "{confirmnotice.remark.length}")
    private String noticeContent;

    @Schema(description = "装货地", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{confirmnotice.polCode.notblank}")
    @Length(max = 5, message = "{confirmnotice.polCode.length}")
    private String polCode;

    @Schema(description = "卸货地", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "{confirmnotice.podCode.notblank}")
    @Length(max = 5, message = "{confirmnotice.podCode.length}")
    private String podCode;

}
